<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
	<?php $this->load->view('common/top', array('title' => 'SEWIKI - CHAPTERLIST')); ?>
	<body>
<script type="text/javascript">
$(document).ready(function(){
	$(".content").toggle();
	$(".box").toggle(
		function(){$(this).parent().parent().next(".content").animate({opacity: 'toggle'}); $(this).attr("src","<?=base_url() . 'static/image/sub.gif'?>");},
		function(){$(this).parent().parent().next(".content").animate({opacity: 'toggle'}); $(this).attr("src","<?=base_url() . 'static/image/plus.gif'?>");}
	);
});
</script>
		<div id="container">
			<?php $this->load->view('common/header'); ?>
			<div id="content">
				<?php $this->load->view('common/menu'); ?>
				<div id="main">
					<div id="chapter_info_title" class="title">
						第<?=$chapter['number']?>章<?=$chapter['title']?>
						<?php if($chapter['edit_state'] == 0):?>
						<a href="<?=site_url('editor/editionManager/createBlankEdition/' . $chapter['cid'])?>">[创建空白新版本]</a>
						<?php endif; ?>
					</div>
					<div id="chapter_info_desc" class="desc">
						<?=$chapter['description']?>
					</div>
					<div id="edition_list_title" class="subtitle">
						版本列表
					</div>
					<div id="edition_list" class="text">
						<table width="100%">
							<thead>
								<tr>
									<th width="25px">展开</th>
									<th width="10%">版本编号</th>
									<th width="8%">创建时间</th>
									<th width="8%">编辑者</th>
									<th>注释</th>
									<th width="110px">操作</th>
								</tr>
							</thead>
							<tbody>
								<?php foreach($editions as $edition): ?>
									<?php $this->load->view('browser/editionItem', $edition); ?>
								<?php endforeach; ?>
								<?php if(count($editions) == 0): ?>
								<tr>
									<td colspan="5">&nbsp;还没有创建版本</td>
								</tr>
								<?php endif; ?>
							</tbody>
						</table>
					</div>
				</div>
			</div>
			<?php $this->load->view('common/footer'); ?>
		</div>
	</body>
</html>